package org.agile2soft.nexoma.tapestry.pages.admin.profiles;

import org.agile2soft.nexoma.core.entities.Profile;
import org.agile2soft.nexoma.core.entities.Service;
import org.apache.tapestry5.annotations.Mixin;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.beaneditor.BeanModel;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.BeanModelSource;

import br.com.arsmachina.tapestrycrud.base.BaseEditPage;
import br.com.arsmachina.tapestrycrud.hibernatevalidator.mixins.HibernateValidatorMixin;

public class ProfilesEdit extends BaseEditPage<Profile,Integer> {

        @Mixin
        @SuppressWarnings("unused")
        private HibernateValidatorMixin hibernateValidatorMixin;

        @Property
        private Service service;

        @Inject
        private BeanModelSource beanModelSource;

        public BeanModel<Service> getServiceModel() {
            return beanModelSource.createEditModel(Service.class, super.getMessages());
        }

}
